/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package carstoredb.controllers;
import carstoredb.models.Car;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author wuhao
 */
@RestController
public class CarController {
 @RequestMapping("/")
    public Car getallcars() {
        return  new Car(100);
    }	

    @RequestMapping("/car")
    public String getcar()
    {
    return "my car";
    }
}
